From d7c17d6ee44ca67eac7d604926cbea58f43cbe04 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Tue, 22 Sep 2015 13:17:07 -0700 Subject: [PATCH] Document use of features for `cfg` more prominently --- src/doc/manifest.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/doc/manifest.md b/src/doc/manifest.md index 8b5d02e46..c79913587 100644 --- a/src/doc/manifest.md +++ b/src/doc/manifest.md @@ -258,7 +258,8 @@ codegen-units = 1 Cargo supports **features** to allow expression of: -* Optional dependencies, which enhance a package, but are not required +* Conditional compilation options (usable through `cfg` attributes); +* Optional dependencies, which enhance a package, but are not required; * Clusters of optional dependencies, such as "postgres", that would include the `postgres` package, the `postgres-macros` package, and possibly other packages (such as development-time mocking libraries, debugging tools, etc.) @@ -277,6 +278,10 @@ name = "awesome" # feature listed in this manifest. default = ["jquery", "uglifier", "session"] +# A feature with no dependencies is used mainly for conditional +# compilation, like `#[cfg(feature = "go-faster")]`. +go-faster = [] + # The "secure-password" feature depends on the bcrypt package. # This aliasing will allow people to talk about the feature in # a higher-level way and allow this package to add more -- 2.30.2